<template>
    <div>
        <el-dialog title="查看详情" :visible.sync="dialogVisible" width="60%">
            <el-descriptions border :column="1">
                <el-descriptions-item v-if="info.categoryName==='0'" label="反馈建议类型">其他</el-descriptions-item>
                <el-descriptions-item v-if="info.categoryName==='1'" label="反馈建议类型">举报</el-descriptions-item>
                <el-descriptions-item v-if="info.categoryName==='2'" label="反馈建议类型">功能调整</el-descriptions-item>
                <el-descriptions-item v-if="info.categoryName==='3'" label="反馈建议类型">异常报告</el-descriptions-item>
                <el-descriptions-item v-if="info.categoryName==='4'" label="反馈建议类型">界面布局</el-descriptions-item>
                <el-descriptions-item v-if="info.categoryName==='5'" label="反馈建议类型">操作问题</el-descriptions-item>
                <el-descriptions-item label="创建人">{{info.createName}}</el-descriptions-item>
                <el-descriptions-item label="手机号码">{{info.phone}}</el-descriptions-item>
                <el-descriptions-item label="创建时间">{{info.createTime}}</el-descriptions-item>
                <el-descriptions-item label="内容">{{info.content}}</el-descriptions-item>
                <el-descriptions-item label="图片">
                    <!-- <img class="tupian" width="100" v-for="item in currentImgs" :key="item.id" :src="item.imgUrl" alt=""> -->
                    <el-image  class="tupian"
                    style="width: 100px;"
                    v-for="item in currentImgs" :key="item.id" :src="item.imgUrl"
                    :preview-src-list="[item.imgUrl]">
                    </el-image>
                  
                </el-descriptions-item>
                
            </el-descriptions>
            <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="dialogVisible = false">关 闭</el-button>
            </span>
        </el-dialog>
    </div>
</template>
<script>
import { feedbackDetail} from "@/request/api/feedback"

export default {
    data() {
        return {
            dialogVisible: false,
            info:{},
            currentImgs:[]
        }
    },
    methods: {
        open(info) {
            this.dialogVisible = true
            this.getDetail(info)

        },
          // 查看详情
          getDetail(id) {
            let a={
                id,
            }
              feedbackDetail(a).then(res => {
                if (res.data.code === 200) {
                    this.info=res.data.result
                    this.currentImgs = res.data.result.imgDtos
                }
            })
        },
    }
}
</script>
<style lang="less" scoped>
/deep/.el-descriptions-item__label{
    width:20%;
}
/deep/.el-descriptions-item__content{
    width:80%;
}
.tupian{
    margin-right: 5px;
}
</style>

